<%@ page import="java.util.List" %>
<%@ page import="com.genghis.ptas.classroom.entity.ClassroomInfo" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8"/>
    <title>学堂在线</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta content="" name="author"/>

    <%@include file="../../common.jsp" %>
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="corporate/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="corporate/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <!-- END GLOBAL MANDATORY STYLES -->

    <!-- BEGIN PAGE LEVEL PLUGIN STYLES -->
    <link href="corporate/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet"/>
    <!-- END PAGE LEVEL PLUGIN STYLES -->

    <!-- BEGIN THEME STYLES -->
    <link href="corporate/css/style-metronic.css" rel="stylesheet" type="text/css"/>
    <link href="corporate/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="corporate/css/themes/blue.css" rel="stylesheet" type="text/css" id="style_color"/>
    <link href="corporate/css/style-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="corporate/css/pages/prices.css" rel="stylesheet" type="text/css"/>
    <link href="corporate/css/custom.css" rel="stylesheet" type="text/css"/>
    <!-- END THEME STYLES -->
    <link rel="shortcut icon" href="favicon.ico"/>
    <%List<ClassroomInfo> classroomInfoList =(List<ClassroomInfo>)request.getAttribute("classroomInfoList");%>
</head>
<!-- END HEAD -->

<!-- BEGIN BODY -->
<body>
<!-- BEGIN PAGE CONTAINER -->
<div class="page-container">

    <!-- BEGIN BREADCRUMBS -->
    <div class="row breadcrumbs margin-bottom-40">
        <div class="container">
            <div class="col-md-4 col-sm-4">
                <h1>学堂在线</h1>
            </div>
            <div class="col-md-8 col-sm-8">
                <ul class="pull-right breadcrumb">
                </ul>
            </div>
        </div>
    </div>
    <!-- END BREADCRUMBS -->

    <!-- BEGIN CONTAINER -->
    <div class="container min-hight">
        <!-- BEGIN PRICING OPTION1 -->
        <div class="row margin-bottom-40">
            <%for(ClassroomInfo classroomInfo : classroomInfoList){%>
                <%if (classroomInfo.getClassroomStudentInfo()==null){%>
                    <div class="col-md-3">
                        <div class="pricing">
                            <div class="pricing-head">
                                <h3><%=classroomInfo.getName()%>
                                    <span>未加入</span>
                                </h3>
                                <h4><i></i><%=classroomInfo.getPlanTime()%><i>天</i> <span>计划用时</span></h4>
                            </div>
                            <ul class="pricing-content list-unstyled">
                                <li><i class="icon-tags"></i> 我的状态：无</li>
                                <li><i class="icon-asterisk"></i> 学堂人数：10</li>
                                <li><i class="icon-heart"></i> 课时数量：5</li>
                                <li><i class="icon-star"></i> 结业分数：<%=classroomInfo.getPassScore()%></li>
                            </ul>
                            <div class="pricing-footer">
                                <p><%=classroomInfo.getMemo()%></p>
                                <a href="javascript:" onclick="enterClassroom(<%=classroomInfo.getId()%>)" class="btn theme-btn">进入学堂<i class = "m-icon-swapright m-icon-white"></i></a>
                            </div>
                        </div>
                    </div>
                <%}else{%>
                    <div class="col-md-3">
                        <div class="pricing pricing-active">
                            <div class="pricing-head pricing-head-active">
                                <h3><%=classroomInfo.getName()%>
                                    <span>已加入</span>
                                </h3>
                                <h4><i></i><%=classroomInfo.getPlanTime()%><i>天</i> <span>计划用时</span></h4>
                            </div>
                            <ul class="pricing-content list-unstyled">
                                <li><i class="icon-tags"></i> 我的状态：<%=classroomInfo.getClassroomStudentInfo().getClassroomCourseName()==null?"无":classroomInfo.getClassroomStudentInfo().getClassroomCourseName()%></li>
                                <li><i class="icon-asterisk"></i> 学堂人数：10</li>
                                <li><i class="icon-heart"></i> 课时数量：5</li>
                                <li><i class="icon-star"></i> 结业分数：<%=classroomInfo.getPassScore()%></li>
                            </ul>
                            <div class="pricing-footer">
                                <p><%=classroomInfo.getMemo()%></p>
                                <a href="javascript:" onclick="enterClassroom(<%=classroomInfo.getId()%>)" class="btn theme-btn">进入学堂<i class = "m-icon-swapright m-icon-white"></i></a>
                            </div>
                        </div>
                    </div>
                <%}%>
            <%}%>
        </div>
        <div class="margin-top-20">
            <ul class="pagination">
                <li>
                    <a href="javascript:" onclick="initStageCourse(1)"><i class="fa fa-angle-left"></i></a>
                </li>
                <c:forEach begin="1" end="${pageNumber+1}" var="number">
                    <li><a href="javascript:" onclick="initStageCourse(${number})">${number}</a></li>
                </c:forEach>
                <li>
                    <a href="javascript:" onclick="initStageCourse(${pageNumber+1})"><i
                            class="fa fa-angle-right"></i></a>
                </li>
            </ul>
        </div>
        <!-- END PRICING OPTION1 -->
    </div>
    <!-- END CONTAINER -->

</div>
<!-- END PAGE CONTAINER -->

<!-- BEGIN COPYRIGHT -->
    <div class="copyright">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <p>
                        <span class="margin-right-10">2014 © 长春工业大学. 苏格拉没有底开发小队 版权所有 </span>
                    </p>
                </div>
                <div class="col-md-4">
                    <ul class="social-footer">
                        <li><img src="ecommerce/img/payments/western-union.jpg" alt="We accept Western Union"
                                title="We accept Western Union"></li>
                       <li><img src="ecommerce/img/payments/american-express.jpg" alt="We accept American Express"
                                title="We accept American Express"></li>
                       <li><img src="ecommerce/img/payments/MasterCard.jpg" alt="We accept MasterCard"
                                title="We accept MasterCard"></li>
                       <li><img src="ecommerce/img/payments/PayPal.jpg" alt="We accept PayPal" title="We accept PayPal">
                       </li>
                       <li><img src="ecommerce/img/payments/visa.jpg" alt="We accept Visa" title="We accept Visa"></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- END COPYRIGHT -->
<!-- Load javascripts at bottom, this will reduce page load time -->
<!-- BEGIN CORE PLUGINS(REQUIRED FOR ALL PAGES) -->
<!--[if lt IE 9]>
<script src="corporate/plugins/respond.min.js"></script>
<![endif]-->
<script src="corporate/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="corporate/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="corporate/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="corporate/plugins/hover-dropdown.js"></script>
<script type="text/javascript" src="corporate/plugins/back-to-top.js"></script>
<!-- END CORE PLUGINS -->
<script src="<c:url value="/js/common/common.js"/>" type="text/javascript"></script>
<base href="<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()%><c:url value="/"/>"/>

<!-- BEGIN PAGE LEVEL JAVASCRIPTS(REQUIRED ONLY FOR CURRENT PAGE) -->
<script type="text/javascript" src="corporate/plugins/fancybox/source/jquery.fancybox.pack.js"></script>
<script src="corporate/scripts/app.js"></script>

<!-- END PAGE LEVEL JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
<script type="text/javascript">
    jQuery(document).ready(function () {
        App.init();
    });

    function enterClassroom(id){
        window.location.href = basePath + "public/enterClassroomInfoDo?id="+id;
    }

    function initStageCourse(page) {
        window.location.href = basePath + "public/userEnterListAllClassroomDo?page="+page;
    }
</script>